﻿@using System.Configuration
@using KMF.Utility
@using KMF.WebUI.Areas.KMFadmin.Models
@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@model IEnumerable<KMF.Common.ProductListForPagingDto>
@{
    ViewBag.Title = "Sản phẩm hot";
    Layout = "~/Areas/KMFadmin/Views/Shared/_layout.cshtml";
}
<nav>
    <div class="breadCrumb">
        <ul>
            <li><a href="@Url.Action("Index", "AdminHome")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="javascript:void(0)">Sản phẩm</a> </li>
            <li><a href="@Url.Action("Index", "AdminProduct")">Danh sách sản phẩm</a> </li>
            <li><a href="@Url.Action("Index", "AdminProductHot")">Sản phẩm Hot</a> </li>
        </ul>
    </div>
</nav>
<div class="toolBox">
    @Html.ToolBox(new List<object> { new Add { ClassCss = "Add", ActionName = "/KMFadmin/AdminProductHot/Add" } })
</div>
<div class="box-Info">
    <div class="Info-header">
        <span>Danh sách các sản phẩm hot</span>
    </div>
    <div class="Info-body">
        <table class="table-odd table-plist">
            <tr>
                <th style="width: 10px;">STT</th>
                <th style="width: 3%;">Ảnh</th>
                <th>Tên</th>
                <th style="width: 20%;">Time end</th>
                @* <th style="width: 44px;">Hiển thị</th>*@
                <th style="width: 5%;">
                    <a href="javascript:void(0)" onclick="DelProductHotAll()">Xóa tất</a>
                </th>
            </tr>
            @if (Model.Any())
            {

                foreach (var item in Model)
                {
                    <tr>
                        <td>@item.STT</td>
                        <td>
                            <img src="@item.ImagePath.ImagePathThumb(50, 50)" />
                        </td>
                        <td>
                            <a href="@Url.Action("Edit", "AdminProduct", new { id = @item.Id })">@item.Name</a>
                        </td>
                        <td>
                            @item.CreateDate 
                        </td>
                        @*<td style="text-align: center;">
                                <input type="checkbox" name="chkShow" @string.Format("{0}", item.Show ? "checked='checked'" : "") />
                            </td>*@
                        <td>
                            <a class="icon-delete bootstrapTangoSmall btnDelTogether" href="javascript:void(0);" idata="113" onclick="DelProductTogether(this);" title="Xóa sp này">Xóa</a>
                        </td>
                    </tr>
                }
            }
        </table>
        <div class="p-paging">
            @Html.PageLinks((PageInfo)ViewBag.PageInfo, i => Url.Action("Index", "AdminProduct", new { page = i }))
        </div>
    </div>
</div>
